package object;

public class ObjectDemo {
    public static void main(String[] args) {
        Point p =new Point(100,200);

        System.out.println(p);
        System.out.println(p.toString());
        Point p1=new Point(100,200);
        Point P2=new Point(100,200);
        System.out.println(p1==P2);
        System.out.println(p1.equals(P2));

        String s1=new String("hello");
        String s2=new String("hello");
        System.out.println(s1.equals(s2));
        StringBuilder builder=new StringBuilder("hello");
        StringBuilder builder1=new StringBuilder("hello");
            System.out.println(builder.equals(builder1));

            System.out.println(s1.equals(builder));



    }
}
